export default [
  {
    path: "/film",
    name: "film",
    component: () => import(/*webpackChunkName:'film'*/ "@/views/film"),

    //子路由
    children: [
      // 热映
      {
        path: "nowplaying",
        name: "nowplaying",
        component: () =>
          import(/*webpackChunkName: 'nowplaying'*/ "@/views/film/nowplaying"),
      },
      // 影院
      {
        path: "cinema",
        name: "cinema",
        component: () =>
          import(/*webpackChunkName: 'cinema'*/ "@/views/film/cinema"),
      },
      // 待映
      {
        path: "comingsoon",
        name: "comingsoon",
        component: () =>
          import(/*webpackChunkName: 'comingsoon'*/ "@/views/film/comingsoon"),
      },
      //经典电影
      {
        path: "classicalmovie",
        name: "classicalmovie",
        component: () =>
          import(
            /*webpackChunkName: 'classicalmovie'*/ "@/views/film/classicalmovie"
          ),
      },
      // 重定向
      { path: "/film", redirect: "nowplaying" },
    ],
  },

  {
    path: "/filmDetail/:id",
    name: "filmDetail",
    component: () =>
      import(
        /*webpackChunkName: 'filmDetail'*/ "@/views/film/filmDetail"
      ),
    props:true
  },
] 
